<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="3">
        <div class="left-side-box">
          <div class="left-title" onselectstart="return false">制度类型</div>
          <div class="left-select">
            <span onselectstart="return false">版本年限</span>
            <el-select v-model="selectedVersion" placeholder="请选择版本类型" size="small" style="width: 125px;">
              <el-option v-for="ver in versionList" :label="ver.version" :value="ver.id"/>
            </el-select>
          </div>
          <div v-for="infoType in infoTypeOptions" :key="infoType.id" @click="handleInfoTypeSelect(infoType)"
               class="left-item" :class="{'selected': selectedInfo.id === infoType.id}" onselectstart="return false">
              <div>{{infoType.label}}</div>
              <div style="width: 30px; height: 20px; border-radius: 8px; background: #E9EDF4; line-height: 20px;">
                {{infoType.value}}
              </div>
          </div>
        </div>
      </el-col>
      <el-col :span="21">
        <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" size="small">
          <el-form-item label="制度名称" prop="systemName">
            <el-input
              v-model="queryParams.systemName"
              placeholder="请输入制度名称"
              clearable
              size="small"
              @keyup.enter.native="handleQuery"/>
          </el-form-item>
          <el-form-item label="制度状态" prop="">
            <el-select v-model="queryParams.status" placeholder="请选择制度状态">
              <el-option v-for="status in statusTypeOptions" :label="status.label" :value="status.value" />
            </el-select>
          </el-form-item>
          <el-form-item label="企业名称" prop="itemName">
            <el-select v-model="queryParams.companyName" placeholder="请选择企业名称">
              <el-option label="全部" value=""/>
            </el-select>
          </el-form-item>
          <el-form-item label="创建时间">
            <el-date-picker v-model="queryParams.createTime"
                            placeholder="开始日期"
                            size="small" style="width: 240px"
                            value-format="yyyy-MM-dd"
                            type="date"></el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">筛选</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>

        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['system:info:add']"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              size="mini"
              :disabled="single"
              @click="handleReport"
              v-hasPermi="['system:info:edit']"
            >上报</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              size="mini"
              @click="handleBatchImport"
              v-hasPermi="['system:info:remove']"
            >批量导入</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['system:info:export']"
            >导出</el-button>
          </el-col>
        </el-row>

        <el-table v-loading="loading" :data="infoList" border @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column type="index" label="序号" width="55" align="center" />
          <el-table-column label="制度名称" align="center" prop="systemName" />
          <el-table-column label="制度类型" align="center" prop="systemType" />
          <el-table-column label="企业名称" align="center" prop="companyName" />
          <el-table-column label="生效日期" align="center" prop="effectiveDate" width="180">
            <template slot-scope="scope">
              <span>{{ scope.row.effectiveDate ? scope.row.effectiveDate.substr(0, 10) : '' }}</span>
            </template>
          </el-table-column>
          <el-table-column label="失效日期" align="center" prop="expireDate" width="180">
            <template slot-scope="scope">
              <span>{{ scope.row.expireDate ? scope.row.expireDate.substr(0, 10) : '' }}</span>
            </template>
          </el-table-column>
          <el-table-column label="创建日期" align="center" prop="expireDate" width="180">
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime) }}</span>
            </template>
          </el-table-column>
          <el-table-column label="状态" align="center" prop="status" />
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <svg-icon style="margin-right:8px; cursor:pointer;" icon-class="edit" @click="handleInfoUpdate(scope.row)"></svg-icon>
              <svg-icon style="margin-right:8px; cursor:pointer;" icon-class="report" @click="handleInfoReport(scope.row)"></svg-icon>
              <svg-icon style="margin-right:8px; cursor:pointer;" icon-class="revoke" @click="handleInfoRevoke(scope.row)"></svg-icon>
              <svg-icon style="margin-right:8px; cursor:pointer;" icon-class="preview" @click="handleInfoDetail(scope.row)"></svg-icon>
              <svg-icon style="margin-right:8px; cursor:pointer;" icon-class="delete" @click="handleInfoDelete(scope.row)"></svg-icon>
              <svg-icon style="cursor: pointer;" icon-class="approval" @click="handleInfoApproval(scope.row)"></svg-icon>
            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-col>
    </el-row>

    <!-- 批量导入 -->
    <el-dialog :title="upload.title" :visible.sync="upload.open" style="margin-top: 15vh" width="400px" @close="handleBatchClose">
      <div style="height: 20px;"></div>
      <el-upload
        ref="batchUpload"
        :limit="1"
        accept=".xlsx, .xls"
        :action="upload.url"
        :disabled="upload.isUploading"
        :on-success="handleBatchSuccess"
        :auto-upload="false"
        drag>
        <i class="el-icon-upload"></i>
        <div class="el-upload__text">
          将文件拖到此处，或
          <em>点击上传</em>
        </div>
        <div class="el-upload__tip" slot="tip">
          <el-link type="info" style="font-size:12px; color: #1890FF;" @click="download('group1/M00/00/00/rBBqSV82D_6APiPUAABuAGtdBKA968.xls')">下载模板</el-link>
        </div>
        <div class="el-upload__tip" style="color:red" slot="tip">提示：仅允许导入“xls”或“xlsx”格式文件！只能导入一个文件！</div>
      </el-upload>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitBatchForm">导 入</el-button>
        <el-button @click="cancelBatch">取 消</el-button>
      </div>
    </el-dialog>

    <!-- 添加或修改 制度信息 对话框 -->
    <el-dialog :title="info.title" :visible.sync="info.open" width="900px" append-to-body @close="handleInfoClose">
      <div style="font-size: 16px; color: #14284A; padding: 30px 10px; font-weight: 700;">
        <svg-icon icon-class="company"></svg-icon>
        安徽省交通控股集团有限公司
      </div>
      <el-form ref="infoForm" :model="info.form" :rules="info.rules" label-width="95px">
        <el-row>
          <el-col :span="20">
            <el-form-item label="制度名称" prop="systemName">
              <el-input :disable="!info.modify" v-model="info.form.systemName" clearable placeholder="请输入制度名称" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="制度类型" prop="systemType">
              <el-select :disabled="!info.modify" v-model="info.form.systemType" placeholder="请选择制度类型">
                <el-option v-for="type in infoTypeOptions" :label="type.label" :value="type.id" />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审批日期" prop="approvalDate">
              <el-date-picker clearable size="small" style="width: 200px"
                              v-model="info.form.approvalDate"
                              type="date" :disabled="!info.modify"
                              value-format="yyyy-MM-dd"
                              placeholder="选择审批日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="生效日期" prop="effectiveDate">
              <el-date-picker clearable size="small" style="width: 200px"
                              v-model="info.form.effectiveDate"
                              type="date" :disabled="!info.modify"
                              value-format="yyyy-MM-dd"
                              placeholder="选择生效日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="失效日期" prop="expireDate">
              <el-date-picker clearable size="small" style="width: 200px"
                              v-model="info.form.expireDate"
                              :disabled="!info.modify"
                              type="date"
                              value-format="yyyy-MM-dd"
                              placeholder="选择失效日期">
              </el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="经合法审查" prop="legalReview">
              <el-radio-group :disabled="!info.modify" v-model="info.form.legalReview">
                <el-radio label="1">是</el-radio>
                <el-radio label="0">否</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          制度表决列表
          <el-button type="text" icon="el-icon-circle-plus" @click="handleAddVote">新增</el-button>
        </el-row>
        <el-row>
          <el-table :data="info.voteList" border style="margin-bottom: 10px;">
            <el-table-column label="序号" type="index" align="center"/>
            <el-table-column label="关联事项清单" prop="itemCode">
              <template slot-scope="scope">
                <el-select :disabled="!info.modify" v-model="scope.row.itemCode" placeholder="请选择事项清单" style="width: 100%">
                  <el-option v-for="item in itemList" :key="item.id" :label="item.itemName" :value="item.id"/>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="表决方式" prop="voteMethod">
              <template slot-scope="scope">
                <el-select :disabled="!info.modify" v-model="scope.row.voteMethod" placeholder="请选择表决方式" style="width: 100%">
                  <el-option v-for="vote in voteTypeOptions" :key="vote.value" :label="vote.label" :value="vote.value"/>
                </el-select>
              </template>
            </el-table-column>
            <el-table-column label="人数占比" prop="proportion" width="150px">
              <template slot-scope="scope">
                <el-input :disabled="!info.modify" v-model="scope.row.proportion" placeholder="请输入人数占比"></el-input>
              </template>
            </el-table-column>
            <el-table-column label="操作" width="100px" align="center">
              <template slot-scope="scope">
                <svg-icon v-if="info.modify" icon-class="delete" @click="handleDelVote(scope)"></svg-icon>
              </template>
            </el-table-column>
          </el-table>
        </el-row>
        <el-row>
          <el-form-item label="正式文件">
            <div style="width: 400px;">
              <el-upload drag v-if="info.modify"
                         :action="uploadUrl"
                         :on-success="handleOfficialChange"
                         :show-file-list="false">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
              </el-upload>
              <div style="display: flex; flex-flow: column nowrap">
                <div v-for="(verFile, idx) in info.officialFileList" :key="idx">
                  <div style="float: left">{{verFile.realName}}</div>
                  <el-button type="text" style="color: #666666; float: right; margin:0 15px 0 0;" @click="download(verFile.url)">
                    <svg-icon icon-class="file-download"></svg-icon>
                    下载
                  </el-button>
                  <el-button v-if="info.modify" type="text" style="color: #666666; float: right; margin:0 15px 0 0;" @click="handleOfficialRemove(idx)">
                    <svg-icon icon-class="delete"></svg-icon>
                    删除
                  </el-button>
                </div>
              </div>
            </div>
          </el-form-item>
        </el-row>
        <el-row>
          <el-form-item label="辅证材料">
            <div style="width: 400px">
              <el-upload drag v-if="info.modify"
                         :action="uploadUrl"
                         :on-success="handleOtherChange"
                         :show-file-list="false">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
              </el-upload>
              <div style="display: flex; flex-flow: column nowrap">
                <div v-for="(verFile, idx) in info.otherFileList" :key="idx">
                  <div style="float: left">{{verFile.realName}}</div>
                  <el-button type="text" style="color: #666666; float: right; margin:0 15px 0 0;" @click="download(verFile.url)">
                    <svg-icon icon-class="file-download"></svg-icon>
                    下载
                  </el-button>
                  <el-button v-if="info.modify" type="text" style="color: #666666; float: right; margin:0 15px 0 0;" @click="handleOtherRemove(idx)">
                    <svg-icon icon-class="delete"></svg-icon>
                    删除
                  </el-button>
                </div>
              </div>
            </div>
          </el-form-item>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitInfoForm">确 定</el-button>
        <el-button @click="cancelInfo">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  import {getItem, listItem} from "@/api/szyd/item";
  import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/szyd/info";
  import { listVersion } from "@/api/szyd/version";
  import {download} from "../../../utils/ruoyi";

export default {
  name: "Info",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 总条数
      total: 0,
      // 【请填写功能名称】表格数据
      infoList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        systemName: undefined,
        systemType: undefined,
        approvalDate: undefined,
        effectiveDate: undefined,
        expireDate: undefined,
        legalReview: undefined,
        evidenceFile: undefined,
        systemFile: undefined,
        itemCode: undefined,
        voteMethod: undefined,
        proportion: undefined
      },
      // 文件上传借口
      uploadUrl: process.env.VUE_APP_BASE_API + '/szyd/upload',

      // 批量导入参数
      upload: {
        // 是否显示弹出层（用户导入）
        open: false,
        // 弹出层标题（用户导入）
        title: "制度信息批量导入",
        // 是否禁用上传
        isUploading: false,
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/szyd/info/importData"
      },

      // 制度信息
      info: {
        open: false,
        modify: true,
        title: '',
        form: {
          id: undefined,
          systemName: undefined,
          systemType: undefined,
          approvalDate: undefined,
          effectiveDate: undefined,
          expireDate: undefined,
          legalReview: '1',
          evidenceFile: undefined,
          systemFile: undefined,
          itemCode: undefined,
          voteMethod: undefined,
          proportion: undefined
        },
        voteList: [],
        officialFileList: [],
        otherFileList: [],
        rules: {
          systemName: [
            { required: true, message: "请输入制度名称", trigger: "blur" }
          ],
          systemType: [
            { required: true, message: "请选择制度类型", trigger: "blur" }
          ],
          effectiveDate: [
            { required: true, message: "请选择生效日期", trigger: "blur" }
          ],
          expireDate: [
            { required: true, message: "请选择失效日期", trigger: "blur" }
          ],
          legalReview: [
            { required: true, message: "请选择是否经合法审核", trigger: "blur" }
          ]
        }
      },

      versionList: [],
      selectedVersion: {},
      selectedInfo: {
        'id': '0',
        'label': '全部',
        'value': '20'
      },
      itemList: [],
      infoTypeOptions: [
        {
          'id': '0',
          'label': '全部',
          'value': '20'
        },{
          'id': '1',
          'label': '议事规则',
          'value': '1'
        },{
          'id': '2',
          'label': '公司章程',
          'value': '3'
        },{
          'id': '3',
          'label': '授权管理办法',
          'value': '4'
        },{
          'id': '4',
          'label': '董事会议事规则',
          'value': '2'
        },{
          'id': '5',
          'label': '党委（委组）议事规则',
          'value': '10'
        },{
          'id': '6',
          'label': '实施办法',
          'value': '0'
        },{
          'id': '7',
          'label': '经理层办公会议事规则',
          'value': '0'
        },
      ],
      statusTypeOptions: [
        {
          'label': '全部',
          'value': ''
        }, {
          'label': '草稿',
          'value': 'draft'
        }, {
          'label': '审核中',
          'value': 'verify'
        }, {
          'label': '审核通过',
          'value': 'approved'
        }, {
          'label': '审核拒绝',
          'value': 'reject'
        }, {
          'label': '已上报',
          'value': 'reported'
        }],
      voteTypeOptions: [
        {
          'label': '赞成票超过应到会员人数的4/5',
          'value': '0'
        },{
          'label': '赞成票超过应到会员人数的3/4',
          'value': '1'
        },{
          'label': '赞成票超过应到会员人数的2/3',
          'value': '2'
        },{
          'label': '赞成票超过应到会员人数的1/2',
          'value': '3'
        },{
          'label': '赞成票超过到会员人数的4/5',
          'value': '4'
        },{
          'label': '赞成票超过到会员人数的3/4',
          'value': '5'
        },{
          'label': '赞成票超过到会员人数的2/3',
          'value': '6'
        },{
          'label': '赞成票超过到会员人数的1/2',
          'value': '7'
        },{
          'label': '全票通过',
          'value': '8'
        }
      ]
    };
  },
  created() {
    this.getVersionList()
    this.getList();
    this.getItemList()
  },
  methods: {
    handleInfoTypeSelect(infoType) {
      this.selectedInfo = infoType
      this.getList()
    },
    getVersionList() {
      listVersion().then(res => {
        if (res && res.code === 200) {
          this.versionList = res.data
          if (res.data && res.data.length > 0) {
            this.selectedVersion = res.data[0]
            this.getList()
          }
        }else {
          this.msgError(res.msg)
        }
      }).catch(err => {
        this.msgError(err)
      })
    },
    /** 查询【请填写功能名称】列表 */
    getList() {
      this.loading = true;
      this.queryParams.systemType = this.selectedInfo.id !== '0' ? this.selectedInfo.label : null
      listInfo(this.queryParams).then(response => {
        this.infoList = response.data;
        this.total = response.total;
        this.loading = false;
      });
    },
    getItemList() {
      listItem({
        pageNum: 1,
        pageSize: 10,
      }).then(res => {
        if (res.code === 200) {
          this.itemList = res.data
        }
      }).catch(err => {

      })
    },
    // 取消按钮
    cancelInfo() {
      this.info.open = false;
      this.resetInfo();
    },
    // 表单重置
    resetInfo() {
      this.info.form = {
        id: undefined,
        systemName: undefined,
        systemType: undefined,
        approvalDate: undefined,
        effectiveDate: undefined,
        expireDate: undefined,
        legalReview: '1',
        evidenceFile: undefined,
        systemFile: undefined,
        itemCode: undefined,
        voteMethod: undefined,
        proportion: undefined
      };
      this.info.officialFileList = []
      this.info.otherFileList = []
      this.info.voteList = []
      this.resetForm("infoForm");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !=1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.resetInfo();
      this.info.open = true;
      this.info.modify = true
      this.info.title = "新增制度信息";
    },
    handleReport() {

    },
    handleBatchImport() {
      this.upload.open = true
    },
    handleBatchClose() {
      this.$refs['batchUpload'].clearFiles()
    },
    handleBatchSuccess() {
      this.upload.open = false
    },
    // 取消事项清单批量导入
    cancelBatch() {
      this.upload.open = false
    },
    // 事项清单批量导入
    submitBatchForm() {
      this.$refs['batchUpload'].submit()
    },
    /** 修改按钮操作 */
    handleInfoUpdate(row) {
      this.resetInfo();
      const id = row.id
      getInfo(id).then(response => {
        if (response.code === 200) {
          this.info.form = response.data;
          this.info.voteList = response.data.voteList
          this.info.officialFileList = JSON.parse(response.data.systemFile) || []
          this.info.otherFileList = JSON.parse(response.data.evidenceFile) || []
          this.info.open = true;
          this.info.modify = true
          this.info.title = "修改制度信息";
        } else {
          this.msgError(response.msg)
        }
      }).catch(err => {
        this.msgError(err)
      });
    },
    /** 新增 制度表决项 */
    handleAddVote() {
      this.info.voteList.push({
        itemCode: undefined,
        voteMethod: undefined,
        proportion: undefined
      })
    },
    /** 删除 制度表决项 */
    handleDelVote({row, $index}) {
      // console.log("handleDelVote: ", row, $index)
      this.info.voteList.splice($index, 1)
    },
    /** 添加 正式文件 */
    handleOfficialChange(res, file, fileList) {
      // console.log(res, file, fileList)
      let {code, realName, url} = res
      if (code === 200) {
        this.info.officialFileList.push({
          realName,
          url
        })
      }
    },
    handleOfficialRemove(index) {
      // console.log(file, fileList)
      this.info.officialFileList.splice(index, 1)
    },
    /** 添加 辅证材料 */
    handleOtherChange(res, file, fileList) {
      // console.log(res, file, fileList)
      let {code, realName, url} = res
      if (code === 200) {
        this.info.otherFileList.push({
          realName,
          url
        })
      }
    },
    handleOtherRemove(index) {
      // console.log(file, fileList)
      this.info.otherFileList.splice(index, 1)
    },
    handleInfoClose() {
      this.resetInfo()
      this.info.open = false
    },
    /** 提交按钮 */
    submitInfoForm: function() {
      this.$refs["infoForm"].validate(valid => {
        if (valid) {
          this.info.form.voteList = this.info.voteList
          this.info.form.systemFile = JSON.stringify(this.info.officialFileList)
          this.info.form.evidenceFile = JSON.stringify(this.info.otherFileList)

          if (this.info.form.id != undefined) {
            updateInfo(this.info.form).then(response => {
              if (response.code === 200) {
                this.msgSuccess("修改成功");
                this.info.open = false;
                this.getList();
              } else {
                this.msgError(response.msg);
              }
            });
          } else {
            addInfo(this.info.form).then(response => {
              if (response.code === 200) {
                this.msgSuccess("新增成功");
                this.info.open = false;
                this.getList();
              } else {
                this.msgError(response.msg);
              }
            });
          }
        }
      });
    },
    handleInfoReport(row) {

    },
    handleInfoRevoke(row) {

    },
    handleInfoDetail(row) {
      this.resetInfo();
      const id = row.id
      getInfo(id).then(response => {
        if (response.code === 200) {
          this.info.form = response.data;
          this.info.voteList = response.data.voteList
          this.info.officialFileList = JSON.parse(response.data.systemFile) || []
          this.info.otherFileList = JSON.parse(response.data.evidenceFile) || []
          this.info.open = true;
          this.info.modify = false
          this.info.title = "制度信息详情";
        } else {
          this.msgError(response.msg)
        }
      }).catch(err => {
        this.msgError(err)
      });
    },
    /** 删除按钮操作 */
    handleInfoDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm('是否确认删除制度信息名称为"' + row.systemName + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return delInfo(ids);
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(function() {});
    },
    handleInfoApproval(row) {

    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所选制度信息数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning"
        }).then(function() {
          return exportInfo(queryParams);
        }).then(response => {
          this.download(response.msg);
        }).catch(function() {});
    }
  }
};
</script>
<style lang="scss" scoped>

  .left-side-box {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    height: calc(100vh - 125px);
    background: white;
    text-align: center;
    border-radius: 5px;

    .left-title {
      position: relative;
      width: 100%;
      height: 50px;
      font-size: 14px;
      line-height: 50px;
      color: white;
      background-color: #374261;
      border-radius: 5px 5px 0 0
    }

    .left-select {
      display: flex;
      flex-flow: row nowrap;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      height: 50px;
      padding: 10px 0;
      font-size: 14px;
      color: #1F1F1F;
    }

    .left-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: relative;
      width: 98%;
      height: 36px;
      padding: 0 10px;
      font-size: 12px;
      color: #14284A;
      line-height: 40px;
      margin-top: 5px;
      cursor: pointer;
    }

    .selected {
      background: #F1F2F4;
      border-radius: 4px;
    }
  }
</style>
